Set endianness before marching on.
authorrobertl <robertl>
Mon, 23 Sep 2002 20:02:40 +0000 (20:02 +0000)
committerrobertl <robertl>
Mon, 23 Sep 2002 20:02:40 +0000 (20:02 +0000)
psp.c

diff --git a/psp.c b/psp.c
index 85b6a4898d13e997f53953e4c07c1294a29b7b80..4c59e66fc7459c303886eb0c43a9d17f1d8f69d5 100644 (file)
--- a/psp.c
+++ b/psp.c
@@ -73,6 +73,11 @@ psp_fread_double(FILE *fp)
 {
        unsigned char buf[8];
        unsigned char sbuf[8];
+
+       if (!endianness_tested) {
+               test_endianness();
+       }
+
        psp_fread(buf, 1, 8, psp_file_in);
        if (i_am_little_endian) {
                return *(double *) buf;